#pragma once

#include "Globals.hpp"
#include "GameState.h"
#include "UIElement.h"
#include "Button.h"
#include "Grid.h"
#include "OverlayMenu.h"
#include "GUISound.h"
#include "GLPrimitives.h"
#include "Character.h"
#include "SuperData.h"
#include "Group.h"
#include "Camera.hpp"
#include "Defines.hpp"

#include "GUIPanel.h"
#include "Lua.h"
#include "GUIManager.h"
#include "GenericKeys.h"

#include "Minimap.h"
#include "Chatbox.hpp"

#include "Timer.hpp"
#include <string>		// Used for timers
#include <sstream>		// Used for timers
#include <map>
#include "GroupManager.h"


struct DoubleCoords
{
	int x1, y1, x2, y2;
};

class GameScreen : public GameState
{
private:

	// Used for FPS display
#ifdef VISUAL_DEBUG
	Timer fpsCounter;
	Timer fpsUpdateCounter;
	int fpsFrame;
	string fpsCaption;
#endif
	    
	// These statements deteremine how often a section of code is ran.
	// It scales with the speed of the computer.
	bool m_TIME_CRITICAL;
	bool m_HIGH_PRIORITY;
	bool m_MEDIUM_PRIORITY;
	bool m_LOW_PRIORITY;

	int m_HIGH_PRIO_I, m_MEDIUM_PRIO_I, m_LOW_PRIO_I;
    
public:
    //Loads resources and intializes objects
    GameScreen();
    
    //Frees resources
    ~GameScreen();
    
    //Main loop functions
    void handle_events();
    void logic();
    void render();
	void add_chat_messages(vector<char*> messages) {};
};